home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / lightwave / cgplwlist / cgplw02001-02250.txt / 000188_koren@hpfcogv.fc.hp.com_Sun Jan 29 21:36:30 PST 1995.msg < prev    next >
Text File  |  1995-02-04  |  3KB  |  99 lines

  1. Article: 2191 of comp.graphics.packages.lightwave
  2. Xref: netcom.com comp.graphics.packages.lightwave:2191
  3. Path: netcom.com!ix.netcom.com!howland.reston.ans.net!news2.near.net!news.mathworks.com!hookup!swrinde!sgiblab!cs.uoregon.edu!reuter.cse.ogi.edu!hp-cv!hp-pcd!news1.boi.hp.com!hpax!hpscit.sc.hp.com!news.dtc.hp.com!col.hp.com!fc.hp.com!news.fc.hp.com!koren
  4. From: koren@hpfcogv.fc.hp.com (Steve Koren)
  5. Newsgroups: comp.graphics.packages.lightwave
  6. Subject: useful little macro to hide surfaces
  7. Date: 30 Jan 1995 04:46:41 GMT
  8. Organization: Hewlett Packard Ft. Collins
  9. Lines: 83
  10. Distribution: world
  11. Message-ID: <KOREN.95Jan29214641@hpfcogv.fc.hp.com>
  12. NNTP-Posting-Host: hpfcogv.fc.hp.com
  13.  
  14.  
  15. Hi,
  16.  
  17. Here's a little macro I worked up.  I always seem to end up with objects
  18. with a great many surfaces, and want to hide all but a few to work on
  19. them.  This macro does that in a manner easier than doing it "by hand".
  20.  
  21. Hope its useful to someone.  I think it should be small enough to post
  22. here, or at least is a better useage of the bandwidth than some of the
  23. discussions that go on :-)
  24.  
  25.   - steve
  26.  
  27. ~~~ cut here ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  28.  
  29. /* CMD: HideSurfaces
  30.  * Hide everything that isn't in one of the specified surfaces.
  31.  * By Steve Koren Copyright 1994 Steve Koren.
  32.  */
  33.  
  34. /* -- See if we have any parameters up front ------------------------------ */
  35.  
  36. arg surfaces
  37.  
  38. /* -- Load proper function libraries -------------------------------------- */
  39.  
  40. signal on error
  41. signal on syntax
  42.  
  43. /*call addlib "rexxsupport.library", 0, -30, 0*/
  44.  
  45. libadd = addlib("LWModelerARexx.port",0)
  46.  
  47. /* -- Generate our requester ---------------------------------------------- */
  48.  
  49. call req_begin "Hide everything EXCEPT these surfaces: "
  50.  
  51. Surf1  = req_addcontrol("Surface 1",'R')
  52. Surf2  = req_addcontrol("Surface 2",'R')
  53. Surf3  = req_addcontrol("Surface 3",'R')
  54. Surf4  = req_addcontrol("Surface 4",'R')
  55. Surf5  = req_addcontrol("Surface 5",'R')
  56.  
  57. call   req_setval Surf1, "Default"
  58. call   req_setval Surf2, "<none>"
  59. call   req_setval Surf3, "<none>"
  60. call   req_setval Surf4, "<none>"
  61. call   req_setval Surf5, "<none>"
  62.  
  63. /* -- Post our requester and ask for input -------------------------------- */
  64. if (~req_post()) then do
  65.     call req_end
  66.     exit
  67. end
  68.  
  69. s1 = req_getval(Surf1)
  70. s2 = req_getval(Surf2)
  71. s3 = req_getval(Surf3)
  72. s4 = req_getval(Surf4)
  73. s5 = req_getval(Surf5)
  74.  
  75. call req_end()
  76.  
  77. call SEL_UNHIDE()
  78. call SEL_MODE(USER)
  79. call SEL_POLYGON(CLEAR)
  80.  
  81. if s1 ~= '<none>' then call SEL_POLYGON(SET, SURFACE, s1)
  82. if s2 ~= '<none>' then call SEL_POLYGON(SET, SURFACE, s2)
  83. if s3 ~= '<none>' then call SEL_POLYGON(SET, SURFACE, s3)
  84. if s4 ~= '<none>' then call SEL_POLYGON(SET, SURFACE, s4)
  85. if s5 ~= '<none>' then call SEL_POLYGON(SET, SURFACE, s5)
  86.  
  87. call SEL_HIDE(UNSELECTED)
  88. call SEL_POLYGON(CLEAR)
  89. exit
  90.  
  91. syntax:
  92. error:
  93.   call end_all
  94.         t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
  95.         exit
  96.  
  97.  
  98.  
  99.